package org.jeecg.modules.goods.goods.service;

import org.jeecg.modules.goods.goods.entity.EbizGoods;
import org.jeecg.modules.goods.goods.entity.Goods;
import org.jeecg.modules.tplus.dto.InventoryQueryRepDto;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * @Description: 产品信息
 * @Author: jeecg-boot
 * @Date: 2025-06-07
 * @Version: V1.0
 */
public interface IGoodsService extends IService<Goods> {

    /**
     * 将T+存货信息转换并保存到cg_goods表
     *
     * @param inventoryDto T+存货信息
     * @param createBy     创建人
     * @return 保存结果
     */
    boolean saveInventoryFromTPlus(InventoryQueryRepDto inventoryDto, String createBy);

    /**
     * 重写save方法，添加T+系统同步
     */
    Goods saveEntity(Goods entity);

    /**
     * 重写updateById方法，添加T+系统同步
     */
    Goods updateEntityById(Goods entity);

    void handleGoodsPic(EbizGoods ebizGoods);

    void handlePlusGoodsPic(EbizGoods ebizGoods, List<Map<String, Object>> list, List<Map<String, Object>> picList);
}
